<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>WebChartViewer.setMouseUsage</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="WebChartViewer.htm">WebChartViewer</a>.<wbr>setMouseUsage</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setMouseUsage(int mouseUsage)
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the mouse usage mode.<br><br>
The following table describes the supported mouse usage modes and the mouse behaviour in each mode.<br><br>
<div style="width:100%;box-sizing:border-box;"><table width="100%" border="1" cellpadding="5" cellspacing="0"> <tr><th width="19%">Constant<th width="19%%">Value<th>Description
<tr><td><a href="Chart.MouseUsageDefault.htm">MouseUsageDefault</a><td>0<td>This represents the default mouse behaviour, which is to support tool tips and hot spot events as defined by the image map.<br><br>
See <a href="BaseChart.getHTMLImageMap.htm">BaseChart.getHTMLImageMap</a> on how to define an image map for a chart.
<tr><td><a href="Chart.MouseUsageScroll.htm">MouseUsageScroll</a><td>2<td>The mouse is used for drag scrolling the chart.<br><br>
When the mouse drags on the plot area, the mouse cursor will change to a scroll cursor, and a selection rectangle representing the shifted plot area will be displayed to reflect the amount dragged. When the mouse is released, the viewport coordinates will be updated to reflect the amount dragged, and a <a href="JsChartViewer.ViewPortChanged.htm">JsChartViewer.ViewPortChanged</a> event will be fired.<br><br>
If the mouse is not dragging inside the plot area, its behaviour is the same as the default mouse behaviour.
<tr><td><a href="Chart.MouseUsageZoomIn.htm">MouseUsageZoomIn</a><td>3<td>The mouse is used for zoom in actions.<br><br>
When the mouse is inside the plot area, the following behaviour will apply:<br><br>
<ul>
<li>The mouse cursor will change to a zoom in cursor (a magnifying glass cursor with a '+' sign inside).<br><br>
<li>When the mouse drags on the plot area, a selection rectangle will be visible. When the mouse button is subsequently released, the viewport coordinates will be updated to reflect the selection rectangle, and a <a href="JsChartViewer.ViewPortChanged.htm">JsChartViewer.ViewPortChanged</a> event will be fired.<br><br>
<li>When the mouse clicks on the plot area without dragging, the viewport will be updated to reflect zooming into the clicked point by a ratio specified in <a href="WebChartViewer.setZoomInRatio.htm">WebChartViewer.setZoomInRatio</a>, and a <a href="JsChartViewer.ViewPortChanged.htm">JsChartViewer.ViewPortChanged</a> event will be fired. </ul>
If the mouse is not inside the plot area, its behaviour is the same as the default mouse behaviour.
<tr><td><a href="Chart.MouseUsageZoomOut.htm">MouseUsageZoomOut</a><td>4<td>The mouse is used for zoom out actions.<br><br>
When the mouse is inside the plot area, the following behaviour will apply:<br><br>
<ul>
<li>The mouse cursor will change to a zoom out cursor (a magnifying glass cursor with a '-' sign inside).<br><br>
<li>When the mouse clicks on the plot area , the viewport will be updated to reflect zooming out from the clicked point by a ratio specified in <a href="WebChartViewer.setZoomOutRatio.htm">WebChartViewer.setZoomOutRatio</a>, and a <a href="JsChartViewer.ViewPortChanged.htm">JsChartViewer.ViewPortChanged</a> event will be fired. </ul>
If the mouse is not inside the plot area, its behaviour is the same as the default mouse behaviour.
</table></div><br>
<b>Note:</b> It is known that mouse cursors for scrolling and zooming work on IE 6.0 or above, and FireFox. Due to the different capabilities of the various browsers, the mouse cursors may or may not appear in other browsers.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>mouseUsage</td><td>(Mandatory)</td><td>The mouse usage mode of the control, which must be one of the predefined constants as shown in the table above.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
